package net.sansi.v3correctserver.validator;

import net.sansi.v3correctserver.validator.impl.PathValidValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Constraint(validatedBy = PathValidValidator.class)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface PathValid {
    String message() default "路径名称非法，只允许字母、数字、下划线、连字符、点和各国语言字符";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}